home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
comm
/
irc
/
soundamirx.lha
/
sound.amirx
next >
Wrap
Text File
|
1999-02-03
|
2KB
|
90 lines
/*
Sound.AmIRX Version 0.9
Installation:
put this is amirc/rexx/
configure it..
type /alias sound /rx sound.amirx %p
save your settings
Enjoy!
*/
Options Results
signal on syntax
script='Sound'
colour=1
/* CONFIGURATION STARTS HERE */
PlayPath="C:Play16" /* Put your play16 path and filename here */
SoundDir="DH2:AmIRCSounds" /* Your sounds directory WITHOUT a trailing "/" */
Text="DH0:Utilities/MultiView" /* Put your multiview/more path and filename here */
/* CONFIGURATION STOPS HERE */
/* PLEASE DO NOT CHANGE THE LINES BELOW */
getmynick
mynick=result
getchannel
channel=result
Usage="Usage: /sound <wavfile without .wav> <action>"
if channel = "" then signal nojoin
parse arg argu1 argu2
snd=argu1
action=argu2
if snd = "list" then signal list
if ~exists(""PlayPath"") then signal noplay
if argu1 = "" then signal noargs
if ~exists(""SoundDir"/"snd".wav") then signal nofile
cecho(""mynick" [playing "snd".wav]"action"")
"raw privmsg "channel" :sound "snd".wav"action""
address command ""PlayPath" "SoundDir"/"snd".wav"
exit
noargs:
cecho("You need to at least type something in!")
cecho(""usage"")
exit
nofile:
cecho("File "snd".wav Does Not Exist! Try Checking the Spelling!")
cecho("You may have entered in the sound path incorrectly..")
cecho("Remember not to add .wav in the filename")
cecho(""usage"")
cecho("For a list of all your sounds, type /sound list")
exit
noplay:
cecho("You do not have Play16 Or the File/Path is Mis-Spelt")
cecho("Please check to see if you have made a mistake")
cecho("Play16 is available from any aminet site")
exit
nojoin:
cecho("Join a channel first you idiot!!")
exit
list:
fname = "Ram:temp"
address command "c:dir "SoundDir"" ">ram:temp"
call open("Input", fname, 'R')
flist = readln("Input")
address command ""Text" "fname""
call close("Input")
address command "c:delete "fname""
exit
bold:
return '02'x||arg(1)||'02'x
underline:
return '1F'x||arg(1)||'1F'x
inverse:
return '16'x||arg(1)||'16'x
cecho:
"ECHO P="d2c(27)"b«"script"» C="colour arg(1)
return 0
syntax:
cecho("Command on line" SIGL "returned" RC ":" errortext(rc) sourceline(SIGL))
exit